//- Copyright (c) 2016 Lucky Byte, Inc.
extends ../layout

append scripts
  script(src="/js/sched/body.js")

block content
  form.ui.form.attached.segment.main(action="/sched/edit" method="post")
    include body

    .ui.buttons(style="margin-top:40px;")
      if page_perms.delete
        button.ui.red.button#delete(type="button"
          data-action="/sched/delete") 删 除
      else
        button.ui.red.button.disabled#delete(type="button")
          i.icon.ban(style="margin-top:1px; margin-right:2px;")
          | 删 除

      button.ui.yellow.button#cancel(type="button"
        onclick="window.location='/sched'") 取 消

      if page_perms.edit
        button.ui.green.button#ok(type="submit") 确 定
      else
        button.ui.green.button.disabled#ok(type="submit")
          i.icon.ban(style="margin-top:1px; margin-right:2px;")
          | 确 定

    if page_perms.edit
      button.ui.blue.button.right.floated.left.icon.labeled.trigger(
        style="margin-top:40px;" type="button") 立即触发
        i.icon.bomb
    else
      button.ui.blue.button.disabled(style="margin-top:40px;" type="button")
        i.icon.ban(style="margin-top:1px; margin-right:2px;")
        | 立即触发
